In order to increase performance of information processing systems, such as those that include microprocessors, both hardware and software techniques have been employed. One approach that has been employed to improve processor performance is known as “multithreading.” In multithreading, an instruction stream is split into multiple instruction streams that can be executed in parallel. In software-only multithreading approaches, such as time-multiplex multithreading or switch-on-event multithreading, the multiple instruction streams are alternatively executed on the same shared processor.
Increasingly, multithreading is supported in hardware. For instance, in one approach, processors in a multi-processor system, such as a chip multiprocessor (CMP) system, may each act on one of the multiple threads simultaneously. In another approach, referred to as simultaneous multithreading (SMT), a single physical processor is made to appear as multiple logical processors to operating systems and user programs. That is, each logical processor maintains a complete set of the architecture state, but nearly all other resources of the physical processor, such as caches, execution units, branch predictors control logic and buses are shared. The threads execute simultaneously and make better use of shared resources than time-multiplex multithreading or switch-on-event multithreading.
For those systems, such as CMP and SMT multithreading systems, that provide hardware support for multiple threads, one or more threads may be idle during execution of a single-threaded application. Utilizing otherwise idle threads to speculatively parallelize the single-threaded application can increase speed of execution, but it is often-times difficult to determine which sections of the single-threaded application should be speculatively executed by the otherwise idle thread. Speculative threads are not always guaranteed to be independent. Inter-thread dependencies may arise at runtime resulting in mis-speculations and will simply cause the speculation to fail. In resolving mis-speculations, a correct architectural state may need to be recovered.
To date, efficient mechanisms for resolving such mis-speculations in speculative multithreading systems have not been fully explored.